<?php

define('_ADMIN_', 1);

include '../config.inc.php';
include _FLEP_LIB_DIR_.'common.inc.php';
include _FLEP_INCLUDE_DIR_.'html_base.inc.php';
include _FLEP_INCLUDE_DIR_.'html_header.inc.php';
include _FLEP_INCLUDE_DIR_.'html_footer.inc.php';

flep_session_start();

$_SESSION['uri'] = $_SERVER['REQUEST_URI'];

if (!flep_valid_login($_SESSION['user'])) {
  header("Location: index.php");
  exit();
}

header("Content-language: es");
header("Content-type: text/html; charset=utf-8");

$flep_page_info = array(
  'title' => 'FLEP - Administraci&oacute;n'
);

if (isset($_GET['page']) && file_exists(_FLEP_PAGE_DIR_ . basename($_GET['page']) . '.inc.php')) {
  include _FLEP_PAGE_DIR_ . basename($_GET['page']) . '.inc.php';
} else {
  include _FLEP_PAGE_DIR_ . 'settings.inc.php';
}

?>
